package com.chinacoal.hr.levelapi.client;

import com.chinacoal.hr.levelapi.client.fallback.AttdanceSummanyClientFallback;
import com.chinacoal.hr.levelapi.client.response.Result;
import com.chinacoal.hr.levelapi.entity.SummaryCalcVO;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import io.swagger.annotations.ApiParam;
import org.springframework.cloud.openfeign.FeignAutoConfiguration;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.ResponseBody;

/**
 * Created by jinyabin on 2020/10/29.
 */
@Api(value = "考勤汇总操作接口", tags = "考勤汇总操作接口")
@FeignClient(name = "ccip-hr-attendance",configuration = FeignAutoConfiguration.class,fallback = AttdanceSummanyClientFallback.class)
public interface AttdanceSummaryClient {

    /**
     * @param page      :
     * @param limit     :
     * @param orgCode   :
     * @param deptId    :
     * @param yearmonth :
     * @param empCode   :
     * @return : com.chinacoal.hr.levelapi.response.Result
     * @author : YunTao.Li
     * @date : 2019/11/26 2019/11/26
     */
    @ResponseBody
    @GetMapping("/summarys")
    @ApiOperation(value = "查询考勤汇总信息")
    public Result list(@ApiParam("当前页数") Long page,
                       @ApiParam("每页条数") Long limit,
                       @ApiParam("组织") String orgCode,
                       @ApiParam("部门") String deptId,
                       @ApiParam("部门") String deptName,
                       @ApiParam("月份") String yearmonth,
                       @ApiParam("员工编码") String empCode);



    /**
     * 考勤统计
     *
     * @return : com.chinacoal.hr.levelimpl.response.Result
     * @author : YunTao.Li
     * @date : 2020/7/24 2020/7/24
     */
    @ResponseBody
    @PostMapping("/summary/calc")
    @ApiOperation(value = "考勤统计")
    public Result calc(@RequestBody SummaryCalcVO calcVO);



}
